﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.stack_backwater_info>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	进浆及回水（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Record/StackWater/<%=ViewData["id"]%>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Record/PiezometerWell/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>浸润线观测</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>渗压观测</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div class="tips_area">进浆及回水更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.stack_id) %>
        <%= Html.HiddenFor(model => model.date) %>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
            
    
    
    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">
        <tr>
            <th colspan="2">进浆及回水（每日 - <%= Model.date.Year%>年<%=Model.date.Month%>月<%=Model.date.Day%>日）</th>
        </tr>

        <tr>
            <td class="lab" style="width:138px;">测量人员：</td>
            <td>
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.tester_id)%>
            </td>
        </tr>
    </table>
    
    <fieldset class="tf_style">
        <legend>进浆量 / 回水量：</legend>

        <table cellpadding="4" cellspacing="0" class="com_from_table">
            <tr>
                <td class="lab" style="width:120px;">进浆量：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.flow_amount, new { style = "width:50px" })%> 万m<sup>3</sup>/day
                    <%= Html.ValidationMessageFor(model => model.flow_amount)%>
                </td>
            </tr>
            <tr>
                <td class="lab" style="width:120px;">回水量：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.back_water, new { style = "width:50px" })%> 万m<sup>3</sup>/day
                    <%= Html.ValidationMessageFor(model => model.back_water)%>
                </td>
            </tr>
            <tr>
                <td class="lab" style="width:120px;">进浆点：</td>
                <td>
                    <select name="flow_point">
                    <%foreach (string no in (string[])ViewData["flowNos"]) { %>
                        <option value="<%=no %>" <%= (Model.flow_point == int.Parse(no) ? "selected='selected'" : "") %>><%=no %>号进浆口</option>
                    <%} %>
                    </select>
                    <% if(!string.IsNullOrEmpty((string)ViewData["flowInPic"])){ %>
                    <a target="_blank" href="<%=Url.Content((string)ViewData["flowInPic"]) %>">查看进浆点图</a><%} %>
                </td>
            </tr>
                
        </table>

    </fieldset>
    
    
    <fieldset class="tf_style">
        <legend>库区回水方式：</legend>
    
        <table cellpadding="4" cellspacing="0" class="com_from_table">
            <tr>
                <td colspan="2" style=" padding-left:2em;">
                    <input type="checkbox" value="1" onclick="setDefaultSlideWidth();" id="drainage_slides" name="drainage_slides" <%if (Model.drainage_slides == 1){ %> checked="checked"<%} %> />排水斜槽
                </td>
            </tr>
            <tr>
                <td class="lab" style="width:120px;">入水水深：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.slide_depth, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.slide_depth)%>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">入水宽度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.slide_width, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.slide_width)%>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">水下盖板是否覆盖：</td>
                <td>
                    <span><input type="radio" name="is_covered" value="1" <%if (Model.is_covered == 1){ %> checked="checked"<%} %>/>是</span>
                    <span><input type="radio" name="is_covered" value="0" <%if (Model.is_covered != 1){ %> checked="checked"<%} %>/>否</span>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">防腐层是否完整：</td>
                <td>
                    <span><input type="radio" name="is_complete" value="1" <%if (Model.is_complete == 1){ %> checked="checked"<%} %>/>是</span>
                    <span><input type="radio" name="is_complete" value="0" <%if (Model.is_complete != 1){ %> checked="checked"<%} %>/>否</span>
                </td>
            </tr>

        </table>

        <table cellpadding="4" cellspacing="0" class="com_from_table" style=" margin-top:8px;">
            <tr>
                <td colspan="2" style=" padding-left:2em;">
                    <input type="checkbox" value="1" id="siphon" name="siphon" <%if (Model.siphon == 1){ %> checked="checked"<%} %> onclick="setDefaultSiphonCaliber();" />虹吸
                </td>
            </tr>
            <tr>
                <td class="lab" style="width:120px;">虹吸流量：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.siphon_flow, new { style = "width:50px" })%> m<sup>3</sup>/hr
                    <%= Html.ValidationMessageFor(model => model.siphon_flow)%>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">虹吸管径：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.siphon_caliber, new { style = "width:50px" })%> mm
                    <%= Html.ValidationMessageFor(model => model.siphon_caliber)%>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">虹吸口入口高程：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.siphon_in_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.siphon_in_El)%>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">虹吸口出口高程：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.siphon_out_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.siphon_out_El)%>
                </td>
            </tr>

            <tr>
                <td class="lab" style="width:120px;">虹吸管长度：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.siphon_length, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.siphon_length)%>
                </td>
            </tr>

        </table>

        <table cellpadding="4" cellspacing="0" class="com_from_table" style=" margin-top:8px;">
            <tr>
                <td colspan="2" style=" padding-left:2em;">
                    <input type="checkbox" value="1" name="movable_flow_shaft" <%if (Model.movable_flow_shaft == 1){ %> checked="checked"<%} %> />移动式排洪竖井
                </td>
            </tr>

        </table>

    </fieldset>


    <fieldset class="tf_style">
        <legend>当日情况补充：</legend>
        <%=Html.TextAreaFor(model => model.description, new { cols="80", rows="5"})%>
    </fieldset>

    <div class="submit_btn_area" style="margin-left:152px;">
        <input type="submit" value="提 交" />
    </div>

    <% } %>




    <script language="javascript" type="text/javascript">
        function setDefaultSiphonCaliber() {
            if ($("#siphon").attr("checked")) {
                if ($("#siphon_caliber").val() == undefined || $("#siphon_caliber").val() == "") {
                    $("#siphon_caliber").val(500);
                }
            }
            else {
                $("#siphon_caliber").val("");
            }
        }

        function setDefaultSlideWidth() {
            if ($("#drainage_slides").attr("checked")) {
                if ($("#slide_width").val() == undefined || $("#slide_width").val() == "") {
                    $("#slide_width").val(1.2);
                }
            }
            else {
                $("#slide_width").val("");
            }
        }
    </script>
</asp:Content>
